<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				padding:0;
				margin:0;
				
			}
			#box{
				width:510px;
				height:454px;
				border:1px solid black;
				margin:50px auto;
				position:relative;
			}
			#box div{
				position:absolute;
				top:0;
				left:0;
			}
		</style>
		<script src="jquery-1.7.2.min.js"></script>
		<script>
			$(function(){
				var i=0;
				var timer;
				timer = setInterval(run,1000);
				function run(){
					i++;
					if(i>3){
						i=0;
					}
					$('#box div').eq(i).fadeIn(300).siblings().fadeOut();
				}
//				$('#box').fadeOut(3000);
				
			})
		</script>
	</head>
	<body>
		<div id="box">
			<div><img src="images/1.jpg" alt="" /></div>
			<div><img src="images/2.jpg" alt="" /></div>
			<div><img src="images/3.jpg" alt="" /></div>
			<div><img src="images/4.jpg" alt="" /></div>
		</div>
	</body>
</html>
